]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st-private: Don't round-trip through a font-string
authorJasper St. Pierre <jstpierre@mecheye.net>
Mon, 3 Dec 2012 19:06:50 +0000 (14:06 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 3 Dec 2012 20:56:59 +0000 (15:56 -0500)
ClutterText can support a PangoFontDescription directly.

https://bugzilla.gnome.org/show_bug.cgi?id=689568

src/st/st-private.c

index a8ec1970c269cf6988c7c9df060f21399ae69cde..793202b78ffbf1af5d0ca197277faef38040529d 100644 (file)
@@ -175,16 +175,13 @@ _st_set_text_from_style (ClutterText *text,
   StTextDecoration decoration;
   PangoAttrList *attribs = NULL;
   const PangoFontDescription *font;
-  gchar *font_string;
   StTextAlign align;
 
   st_theme_node_get_foreground_color (theme_node, &color);
   clutter_text_set_color (text, &color);
 
   font = st_theme_node_get_font (theme_node);
-  font_string = pango_font_description_to_string (font);
-  clutter_text_set_font_name (text, font_string);
-  g_free (font_string);
+  clutter_text_set_font_description (text, (PangoFontDescription *) font);
 
   decoration = st_theme_node_get_text_decoration (theme_node);
   if (decoration)